part of base.widgets;

class TabBox extends StatelessWidget {
  const TabBox({
    Key? key,
    required this.child,
    this.enabled = true,
    this.color,
    this.disabledColor,
    this.splashColor,
    this.highlightColor,
    this.inkColor,
    this.onTap,
    this.width,
    this.height,
    this.margin,
    this.pading,
    this.radius: 0,
  }) : super(key: key);

  final child;
  final Color? splashColor;
  final Color? highlightColor;
  final Color? color;
  final Color? disabledColor;
  final Color? inkColor;
  final double? height;
  final double? width;
  final double radius;
  final Function()? onTap;
  final EdgeInsetsGeometry? margin;
  final EdgeInsetsGeometry? pading;
  final bool enabled;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: margin,
      padding: pading,
      child: Ink(
        height: height ?? 44.h,
        width: width,
        decoration: BoxDecoration(
          color: inkColor,
          borderRadius: BorderRadius.circular(radius),
        ),
        child: InkWell(
          highlightColor: highlightColor,
          splashColor: splashColor,
          onTap: enabled ? onTap : null,
          borderRadius: BorderRadius.circular(radius),
          child: child,
        ),
      ),
    );
  }
}
